package corej.exam.com.usermgmt;

/*
 * ��������DataBuilder
 * ͨ������ַ��ļ�/user��/group�еĴ�������User��Group����
 * DataBuilder��ͼ����:
 * CLASS:	DataBuilder 
 * +parseUser(line : String) : User
 * +parseGroup(line : String): Group
 */

public class DataBuilder {
    public DataBuilder() {
        super();
    }

    public User parseUser(String line) {
        String[] strArray = line.split(":");
        User u = new User(strArray[0], strArray[1], strArray[2]);
        return u;
    }

    public Group parseGroup(String line) {
        String[] strArray = line.split(":");
        Group g = new Group(strArray[0], strArray[1], strArray[2]);
        return g;
    }

}
